class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.w: D = None
        self.p: C = None
        self.z: E = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.w: F = None
        self.x: B = None
        self.o: E = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: D = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

l.x = a
l.y = a
m.o = n
m.z = n
m.q = e
m.w = h
m.p = a
m.x = c
m.t = l
a.u = e
i.y = e
i.z = a
i.p = a
i.w = c
i.x = m
i.o = n
n.o = i
n.u = a
c.t = m
c.z = e
c.x = a
e.y = c
e.z = i
e.p = a
e.o = n
h.y = e
h.z = a
h.p = a
h.w = c
h.x = m
h.o = n
assert l.y.u.z.z.u.o.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.w: D = None
        self.p: C = None
        self.z: E = None
        self.x: F = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: C = None
        self.w: F = None
        self.x: B = None
        self.o: E = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: D = None
        self.p: C = None
        self.o: E = None
        self.txt = txt

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

l.x = a
l.y = a
m.o = n
m.z = n
m.q = e
m.w = h
m.p = a
m.x = c
m.t = l
a.u = e
i.y = e
i.z = a
i.p = a
i.w = c
i.x = m
i.o = n
n.o = i
n.u = a
c.t = m
c.z = e
c.x = a
e.y = c
e.z = i
e.p = a
e.o = n
h.y = e
h.z = a
h.p = a
h.w = c
h.x = m
h.o = n
assert l.y.u.z.z.u.o.o.y.txt == "e"