class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.q: E = None
        self.r: B = None
        self.o: H = None
        self.u: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.p: B = None
        self.s: C = None
        self.t: E = None
        self.z: A = None
        self.u: C = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.q: F = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.y: F = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.p: B = None
        self.s: C = None
        self.t: E = None
        self.z: A = None
        self.u: C = None
        self.o: C = None
        self.w: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: D = None
        self.q: F = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: G = None
        self.txt = txt

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

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