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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.q: D = None
        self.t: G = None
        self.txt = txt

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

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

c = A("c")
b = B("b")
e = C("e")
l = D("l")
g = E("g")
h = F("h")
k = G("k")
m = C("m")

c.t = g
c.p = e
c.x = h
c.q = k
b.x = e
e.v = g
e.x = m
e.t = m
l.p = g
l.s = k
l.x = c
l.r = b
l.v = h
g.u = l
g.q = l
g.p = b
g.t = k
h.z = g
h.p = k
k.o = g
k.p = l
k.x = b
m.v = g
m.x = e
m.t = e
assert l.x.t.t.o.p.x.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: C = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.q: D = None
        self.t: G = None
        self.txt = txt

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

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

c = A("c")
b = B("b")
e = C("e")
l = D("l")
g = E("g")
h = F("h")
k = G("k")
m = C("m")

c.t = g
c.p = e
c.x = h
c.q = k
b.x = e
e.v = g
e.x = m
e.t = m
l.p = g
l.s = k
l.x = c
l.r = b
l.v = h
g.u = l
g.q = l
g.p = b
g.t = k
h.z = g
h.p = k
k.o = g
k.p = l
k.x = b
m.v = g
m.x = e
m.t = e
assert l.x.t.t.o.p.x.txt == "e"