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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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

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

f = A("f")
d = B("d")
k = C("k")
b = D("b")
i = E("i")
h = F("h")
n = G("n")
m = D("m")
e = B("e")

f.o = b
f.x = k
f.y = n
d.o = i
d.v = i
d.u = n
d.t = h
d.z = e
k.t = n
b.s = n
b.o = h
b.x = h
i.q = h
i.r = n
h.t = d
h.o = n
h.x = n
h.v = n
h.s = n
h.u = f
h.p = k
n.u = i
n.s = i
n.q = h
n.t = f
n.o = e
m.s = n
m.o = h
m.x = h
e.o = i
e.v = i
e.u = n
e.t = h
e.z = d
assert n.q.t.z.z.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: F = None
        self.x: F = None
        self.txt = txt

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

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

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

f = A("f")
d = B("d")
k = C("k")
b = D("b")
i = E("i")
h = F("h")
n = G("n")
m = D("m")
e = B("e")

f.o = b
f.x = k
f.y = n
d.o = i
d.v = i
d.u = n
d.t = h
d.z = e
k.t = n
b.s = n
b.o = h
b.x = h
i.q = h
i.r = n
h.t = d
h.o = n
h.x = n
h.v = n
h.s = n
h.u = f
h.p = k
n.u = i
n.s = i
n.q = h
n.t = f
n.o = e
m.s = n
m.o = h
m.x = h
e.o = i
e.v = i
e.u = n
e.t = h
e.z = d
assert n.q.t.z.z.u.u.txt == "i"