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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.r: E = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.r: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: B = None
        self.r: E = None
        self.o: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.o: B = None
        self.txt = txt

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

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

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