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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: D = None
        self.q: A = None
        self.p: H = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: E = None
        self.q: B = None
        self.o: E = None
        self.t: D = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.z: C = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.v: D = None
        self.t: D = None
        self.y: A = None
        self.z: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

a = A("a")
n = B("n")
d = C("d")
c = D("c")
f = E("f")
i = F("i")
g = G("g")
l = H("l")
m = F("m")
k = E("k")

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: D = None
        self.q: A = None
        self.p: H = None
        self.y: E = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: E = None
        self.q: B = None
        self.o: E = None
        self.t: D = None
        self.x: H = None
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.z: C = None
        self.q: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.v: D = None
        self.t: D = None
        self.y: A = None
        self.z: C = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

a = A("a")
n = B("n")
d = C("d")
c = D("c")
f = E("f")
i = F("i")
g = G("g")
l = H("l")
m = F("m")
k = E("k")

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