class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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