class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.q: E = None
        self.s: G = None
        self.p: G = None
        self.t: H = None
        self.u: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: B = None
        self.r: A = None
        self.v: H = None
        self.p: C = None
        self.t: A = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: B = None
        self.r: A = None
        self.v: H = None
        self.p: C = None
        self.t: A = None
        self.z: B = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

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