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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: A = None
        self.x: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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