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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: E = None
        self.s: A = None
        self.w: B = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.p: F = None
        self.u: E = None
        self.v: A = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: A = None
        self.o: E = None
        self.s: A = None
        self.w: B = None
        self.z: A = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: F = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: D = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: F = None
        self.p: F = None
        self.u: E = None
        self.v: A = None
        self.s: A = None
        self.q: A = None
        self.txt = txt

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

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