class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: C = None
        self.t: H = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: G = None
        self.z: H = None
        self.v: F = None
        self.r: H = None
        self.t: F = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: F = None
        self.o: E = None
        self.x: D = None
        self.p: D = None
        self.w: B = None
        self.v: B = None
        self.z: H = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

l = A("l")
m = B("m")
j = C("j")
f = D("f")
e = E("e")
h = F("h")
d = G("d")
c = H("c")
n = I("n")

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: A = None
        self.y: A = None
        self.w: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: G = None
        self.z: H = None
        self.v: F = None
        self.r: H = None
        self.t: F = None
        self.y: B = None
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: F = None
        self.o: E = None
        self.x: D = None
        self.p: D = None
        self.w: B = None
        self.v: B = None
        self.z: H = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

l = A("l")
m = B("m")
j = C("j")
f = D("f")
e = E("e")
h = F("h")
d = G("d")
c = H("c")
n = I("n")

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