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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.o: F = None
        self.r: F = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.q: C = None
        self.t: G = None
        self.x: B = None
        self.o: H = None
        self.y: H = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.t: A = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: H = None
        self.o: F = None
        self.r: F = None
        self.y: A = None
        self.s: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.q: C = None
        self.t: G = None
        self.x: B = None
        self.o: H = None
        self.y: H = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.t: A = None
        self.o: C = None
        self.q: A = None
        self.txt = txt

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

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