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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: G = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.o: A = None
        self.x: C = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
k = D("k")
e = E("e")
j = F("j")
m = G("m")
c = C("c")
g = A("g")
n = G("n")

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: D = None
        self.u: G = None
        self.r: D = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.o: A = None
        self.x: C = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
k = D("k")
e = E("e")
j = F("j")
m = G("m")
c = C("c")
g = A("g")
n = G("n")

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