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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.v: E = None
        self.r: D = None
        self.s: D = None
        self.w: F = None
        self.x: D = 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.o: G = None
        self.r: A = None
        self.w: B = None
        self.s: E = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: E = None
        self.v: A = None
        self.s: G = None
        self.p: G = None
        self.o: E = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: A = None
        self.v: E = None
        self.r: D = None
        self.s: D = None
        self.w: F = None
        self.x: D = 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.o: G = None
        self.r: A = None
        self.w: B = None
        self.s: E = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: E = None
        self.v: A = None
        self.s: G = None
        self.p: G = None
        self.o: E = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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