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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: I = None
        self.q: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.z: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.o: B = None
        self.z: F = None
        self.t: B = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: B = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.q: H = None
        self.t: H = None
        self.p: D = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: E = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.u: I = None
        self.q: E = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: G = None
        self.z: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: C = None
        self.o: B = None
        self.z: F = None
        self.t: B = None
        self.u: H = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: B = None
        self.o: D = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.x: H = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: G = None
        self.q: H = None
        self.t: H = None
        self.p: D = None
        self.r: G = None
        self.txt = txt

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

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