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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.o: D = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.txt = txt

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

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