class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: C = None
        self.r: E = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: C = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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