class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

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

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

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

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