class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: C = None
        self.z: F = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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