class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.u: E = None
        self.z: D = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.s: C = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.y: H = None
        self.p: B = None
        self.t: D = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: I = None
        self.r: G = None
        self.y: B = None
        self.z: B = None
        self.u: H = None
        self.p: B = None
        self.v: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.z: F = None
        self.v: D = None
        self.s: C = None
        self.p: E = None
        self.y: G = None
        self.q: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.s: A = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
j = D("j")
f = E("f")
b = F("b")
d = G("d")
m = H("m")
h = I("h")

k.q = f
k.u = f
k.v = h
k.z = j
k.x = m
i.w = f
i.x = h
i.s = g
i.z = b
i.p = b
g.u = m
g.v = f
g.x = b
j.t = h
j.s = b
j.p = m
f.o = b
f.v = b
f.z = j
f.t = j
f.y = m
f.r = m
f.p = i
b.t = m
b.u = m
b.s = h
b.r = d
b.y = i
b.z = i
b.p = i
b.v = f
b.w = g
d.y = m
d.r = j
m.w = k
m.x = j
m.v = j
m.z = b
m.s = g
m.p = f
m.y = d
m.r = d
m.q = i
h.z = j
h.y = g
h.v = g
h.s = k
h.r = b
assert j.p.w.u.t.s.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: I = None
        self.u: E = None
        self.z: D = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: I = None
        self.s: C = None
        self.z: F = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: E = None
        self.x: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: F = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.y: H = None
        self.p: B = None
        self.t: D = None
        self.r: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: I = None
        self.r: G = None
        self.y: B = None
        self.z: B = None
        self.u: H = None
        self.p: B = None
        self.v: E = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: D = None
        self.z: F = None
        self.v: D = None
        self.s: C = None
        self.p: E = None
        self.y: G = None
        self.q: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: C = None
        self.s: A = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

k = A("k")
i = B("i")
g = C("g")
j = D("j")
f = E("f")
b = F("b")
d = G("d")
m = H("m")
h = I("h")

k.q = f
k.u = f
k.v = h
k.z = j
k.x = m
i.w = f
i.x = h
i.s = g
i.z = b
i.p = b
g.u = m
g.v = f
g.x = b
j.t = h
j.s = b
j.p = m
f.o = b
f.v = b
f.z = j
f.t = j
f.y = m
f.r = m
f.p = i
b.t = m
b.u = m
b.s = h
b.r = d
b.y = i
b.z = i
b.p = i
b.v = f
b.w = g
d.y = m
d.r = j
m.w = k
m.x = j
m.v = j
m.z = b
m.s = g
m.p = f
m.y = d
m.r = d
m.q = i
h.z = j
h.y = g
h.v = g
h.s = k
h.r = b
assert j.p.w.u.t.s.t.q.txt == "i"