class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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