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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.s: D = None
        self.o: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: B = None
        self.y: E = None
        self.x: H = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: G = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.s: D = None
        self.o: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: B = None
        self.y: E = None
        self.x: H = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: G = None
        self.s: B = None
        self.q: F = None
        self.txt = txt

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

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