class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: F = None
        self.o: B = None
        self.r: C = None
        self.q: F = None
        self.u: E = None
        self.z: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: E = None
        self.o: C = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: B = None
        self.z: A = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.y: C = None
        self.txt = txt

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

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