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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.y: C = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.t: A = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: B = None
        self.y: C = None
        self.w: B = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.t: A = None
        self.y: D = None
        self.txt = txt

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

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