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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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