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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.u: C = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.r: A = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.txt = txt

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

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

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

b.o = d
b.p = c
b.t = c
h.x = d
h.p = f
h.u = f
h.y = l
h.r = c
l.v = d
l.o = d
l.t = j
l.r = b
l.x = h
m.s = e
m.r = b
j.q = l
j.v = m
j.s = e
j.t = b
d.q = m
d.y = e
d.p = j
d.s = b
d.x = f
d.r = c
n.s = e
n.r = b
c.x = e
c.p = f
c.u = f
c.y = f
c.r = h
f.v = e
f.t = j
f.r = b
f.x = c
f.o = d
e.q = m
e.y = d
e.p = j
e.s = b
e.x = l
e.r = h
assert e.r.x.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: B = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.u: C = None
        self.y: C = None
        self.r: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: E = None
        self.r: A = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: A = None
        self.txt = txt

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

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

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

b.o = d
b.p = c
b.t = c
h.x = d
h.p = f
h.u = f
h.y = l
h.r = c
l.v = d
l.o = d
l.t = j
l.r = b
l.x = h
m.s = e
m.r = b
j.q = l
j.v = m
j.s = e
j.t = b
d.q = m
d.y = e
d.p = j
d.s = b
d.x = f
d.r = c
n.s = e
n.r = b
c.x = e
c.p = f
c.u = f
c.y = f
c.r = h
f.v = e
f.t = j
f.r = b
f.x = c
f.o = d
e.q = m
e.y = d
e.p = j
e.s = b
e.x = l
e.r = h
assert e.r.x.r.x.txt == "e"