class A:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: C = None
        self.r: D = None
        self.z: C = None
        self.q: E = None
        self.p: E = None
        self.s: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: F = None
        self.t: E = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: F = None
        self.t: E = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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