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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.w: B = None
        self.u: F = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.w: B = None
        self.u: F = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

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

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

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