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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.x: D = None
        self.q: D = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: A = None
        self.z: B = None
        self.u: G = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.x: D = None
        self.q: D = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: A = None
        self.z: B = None
        self.u: G = None
        self.p: A = None
        self.y: B = None
        self.txt = txt

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

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