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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.x: F = None
        self.v: I = None
        self.s: E = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.w: E = None
        self.s: I = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: I = None
        self.x: F = None
        self.v: I = None
        self.s: E = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.w: E = None
        self.s: I = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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