class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.y: F = None
        self.p: H = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: J = None
        self.v: E = None
        self.y: I = None
        self.z: I = None
        self.r: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: J = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

f.o = i
f.y = i
f.w = l
f.z = l
f.p = m
f.s = a
k.x = n
c.o = n
c.r = n
c.q = n
c.u = b
c.v = j
c.y = l
c.z = l
a.p = j
j.x = c
i.q = c
i.s = c
n.u = j
m.w = b
m.t = f
l.q = m
l.y = b
l.t = j
b.v = i
b.p = a
assert j.x.y.q.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: I = None
        self.y: F = None
        self.p: H = None
        self.s: D = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: J = None
        self.v: E = None
        self.y: I = None
        self.z: I = None
        self.r: G = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: J = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: D = None
        self.txt = txt

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

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