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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.t: A = None
        self.w: C = None
        self.z: B = None
        self.v: C = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.t: A = None
        self.w: C = None
        self.z: B = None
        self.v: C = None
        self.y: H = None
        self.o: G = None
        self.txt = txt

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

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

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