class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.p: D = None
        self.u: F = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.w: C = None
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

e.v = m
e.o = m
e.w = l
e.p = l
e.t = l
e.u = f
m.u = i
c.x = k
c.z = e
c.q = l
c.p = f
c.v = d
l.o = k
l.t = c
l.p = i
d.z = l
f.q = k
f.x = c
f.w = c
f.v = c
f.u = c
i.q = m
i.t = k
k.q = m
k.t = i
assert e.o.u.t.q.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.p: D = None
        self.u: F = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.t: C = None
        self.p: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.w: C = None
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

e.v = m
e.o = m
e.w = l
e.p = l
e.t = l
e.u = f
m.u = i
c.x = k
c.z = e
c.q = l
c.p = f
c.v = d
l.o = k
l.t = c
l.p = i
d.z = l
f.q = k
f.x = c
f.w = c
f.v = c
f.u = c
i.q = m
i.t = k
k.q = m
k.t = i
assert e.o.u.t.q.u.t.txt == "k"