class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: C = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
h = B("h")
f = C("f")
g = D("g")
d = E("d")
a = F("a")
e = B("e")
j = E("j")

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

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

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

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

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

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

c = A("c")
h = B("h")
f = C("f")
g = D("g")
d = E("d")
a = F("a")
e = B("e")
j = E("j")

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