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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: H = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.z: F = None
        self.txt = txt

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

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

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