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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.r: E = None
        self.v: D = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.y: F = None
        self.t: A = None
        self.x: A = None
        self.s: F = None
        self.v: A = None
        self.txt = txt

n = A("n")
f = B("f")
g = C("g")
d = D("d")
c = E("c")
h = F("h")
l = G("l")
j = C("j")

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.r: E = None
        self.v: D = None
        self.u: B = None
        self.q: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.x: G = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.y: F = None
        self.t: A = None
        self.x: A = None
        self.s: F = None
        self.v: A = None
        self.txt = txt

n = A("n")
f = B("f")
g = C("g")
d = D("d")
c = E("c")
h = F("h")
l = G("l")
j = C("j")

n.p = f
n.w = c
n.x = c
f.z = h
f.r = n
f.o = n
f.y = n
f.p = j
f.t = l
g.w = c
g.r = c
g.q = c
g.o = j
g.v = d
g.u = f
d.v = l
c.t = g
c.p = g
c.s = d
c.z = d
c.u = h
c.y = n
c.w = n
h.w = l
h.p = l
h.x = l
h.y = l
l.r = h
l.y = h
l.s = h
l.u = n
l.t = n
l.x = n
l.v = n
j.w = c
j.r = c
j.q = c
j.o = g
j.v = d
j.u = f
assert c.w.p.t.txt == "l"