class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: E = None
        self.w: E = None
        self.y: F = None
        self.q: H = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.u: E = None
        self.p: D = None
        self.q: H = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: B = None
        self.z: A = None
        self.p: A = None
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.u: E = None
        self.p: D = None
        self.q: H = None
        self.r: D = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: B = None
        self.z: A = None
        self.p: A = None
        self.x: A = None
        self.u: E = None
        self.txt = txt

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

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