class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.q: E = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.o: E = None
        self.v: F = None
        self.r: C = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.w: D = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
c = D("c")
m = E("m")
n = F("n")
d = G("d")
i = E("i")
b = G("b")
l = B("l")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.q: E = None
        self.s: D = None
        self.z: B = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: G = None
        self.o: E = None
        self.v: F = None
        self.r: C = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: A = None
        self.w: D = None
        self.y: E = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

f = A("f")
h = B("h")
e = C("e")
c = D("c")
m = E("m")
n = F("n")
d = G("d")
i = E("i")
b = G("b")
l = B("l")

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