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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.p: G = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.z: B = None
        self.y: A = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

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

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

e = A("e")
b = B("b")
m = C("m")
c = D("c")
g = E("g")
n = F("n")
l = G("l")
j = C("j")

e.o = b
e.y = g
b.w = l
b.p = l
b.s = l
b.u = c
b.x = g
m.z = g
m.s = b
m.q = b
m.v = j
m.y = j
m.p = n
m.o = n
c.x = e
g.u = c
g.o = l
g.z = b
g.r = b
g.y = e
g.p = j
n.v = b
l.q = b
j.z = g
j.s = b
j.q = b
j.v = m
j.y = m
j.p = n
j.o = n
assert c.x.o.x.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: D = None
        self.p: G = None
        self.x: E = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: G = None
        self.z: B = None
        self.y: A = None
        self.p: C = None
        self.r: B = None
        self.txt = txt

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

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

e = A("e")
b = B("b")
m = C("m")
c = D("c")
g = E("g")
n = F("n")
l = G("l")
j = C("j")

e.o = b
e.y = g
b.w = l
b.p = l
b.s = l
b.u = c
b.x = g
m.z = g
m.s = b
m.q = b
m.v = j
m.y = j
m.p = n
m.o = n
c.x = e
g.u = c
g.o = l
g.z = b
g.r = b
g.y = e
g.p = j
n.v = b
l.q = b
j.z = g
j.s = b
j.q = b
j.v = m
j.y = m
j.p = n
j.o = n
assert c.x.o.x.o.q.txt == "b"