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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.w: A = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
a = B("a")
j = C("j")
b = D("b")
d = E("d")
m = F("m")
c = G("c")
n = D("n")
h = C("h")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: C = None
        self.w: A = None
        self.x: C = None
        self.txt = txt

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

g = A("g")
a = B("a")
j = C("j")
b = D("b")
d = E("d")
m = F("m")
c = G("c")
n = D("n")
h = C("h")

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