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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.o: C = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

c.p = f
c.v = f
c.z = f
c.x = e
c.q = e
c.u = i
c.s = m
c.t = a
a.p = n
f.s = a
f.x = a
f.u = e
f.v = m
f.r = c
e.o = b
e.t = c
n.x = c
n.o = f
m.x = b
m.u = b
m.o = e
m.s = f
m.t = i
i.s = n
i.q = m
i.o = f
i.w = b
i.x = a
b.x = a
b.q = a
b.s = a
b.u = n
b.r = f
assert a.p.x.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: C = None
        self.x: D = None
        self.u: G = None
        self.s: F = None
        self.t: B = None
        self.q: D = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.o: C = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

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