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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.p: E = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: A = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.p: E = None
        self.v: A = None
        self.r: B = None
        self.txt = txt

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

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