class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: B = None
        self.w: C = None
        self.y: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: I = None
        self.q: J = None
        self.p: D = None
        self.t: A = None
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.w: I = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: I = None
        self.q: J = None
        self.p: D = None
        self.t: A = None
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: C = None
        self.w: I = None
        self.x: D = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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