class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.w: C = None
        self.u: B = None
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.y: D = None
        self.r: B = None
        self.u: F = None
        self.q: B = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.v: A = None
        self.o: D = None
        self.u: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
e = D("e")
d = E("d")
l = F("l")
m = G("m")
f = H("f")
b = A("b")

c.v = a
c.w = a
c.z = a
c.t = i
c.u = i
c.q = f
i.p = m
a.o = m
a.p = l
a.q = e
a.r = d
e.p = m
e.z = m
e.r = a
e.o = d
e.t = l
e.w = c
e.v = i
d.p = l
d.u = l
d.s = e
d.y = e
d.r = i
d.q = i
d.t = i
l.t = i
m.y = i
m.u = i
m.t = f
m.r = f
m.v = b
m.o = e
f.w = m
b.v = a
b.w = a
b.z = a
b.t = i
b.u = i
b.q = f
assert c.v.p.t.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: B = None
        self.w: C = None
        self.u: B = None
        self.q: H = None
        self.z: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: D = None
        self.y: D = None
        self.r: B = None
        self.u: F = None
        self.q: B = None
        self.t: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: H = None
        self.v: A = None
        self.o: D = None
        self.u: B = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

c = A("c")
i = B("i")
a = C("a")
e = D("e")
d = E("d")
l = F("l")
m = G("m")
f = H("f")
b = A("b")

c.v = a
c.w = a
c.z = a
c.t = i
c.u = i
c.q = f
i.p = m
a.o = m
a.p = l
a.q = e
a.r = d
e.p = m
e.z = m
e.r = a
e.o = d
e.t = l
e.w = c
e.v = i
d.p = l
d.u = l
d.s = e
d.y = e
d.r = i
d.q = i
d.t = i
l.t = i
m.y = i
m.u = i
m.t = f
m.r = f
m.v = b
m.o = e
f.w = m
b.v = a
b.w = a
b.z = a
b.t = i
b.u = i
b.q = f
assert c.v.p.t.p.o.txt == "e"