class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: E = None
        self.s: E = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.q: C = None
        self.r: B = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.r: C = None
        self.v: B = None
        self.x: B = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.o: A = None
        self.r: A = None
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: C = None
        self.q: C = None
        self.r: B = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.r: C = None
        self.v: B = None
        self.x: B = None
        self.o: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.o: A = None
        self.r: A = None
        self.v: B = None
        self.x: D = None
        self.txt = txt

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

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

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