class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.y: D = None
        self.s: H = None
        self.v: D = None
        self.z: E = None
        self.w: H = None
        self.r: H = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.t: F = None
        self.o: G = None
        self.z: F = None
        self.u: E = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.u: F = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.t: F = None
        self.o: G = None
        self.z: F = None
        self.u: E = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: G = None
        self.u: F = None
        self.z: F = None
        self.p: B = None
        self.txt = txt

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

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