class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.r: E = None
        self.x: H = None
        self.w: F = None
        self.v: H = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.t: D = None
        self.p: F = None
        self.y: D = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: C = None
        self.t: D = None
        self.p: F = None
        self.y: D = None
        self.q: C = None
        self.txt = txt

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

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