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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.o: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.w: C = None
        self.u: B = None
        self.o: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: F = None
        self.w: D = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: B = None
        self.o: H = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: A = None
        self.w: C = None
        self.u: B = None
        self.o: C = None
        self.txt = txt

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

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

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