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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: I = None
        self.w: C = None
        self.r: I = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.u: B = None
        self.y: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

j.u = m
g.z = l
c.o = g
c.q = b
k.o = g
k.v = f
k.r = f
k.w = c
k.s = j
h.u = g
m.x = k
m.t = g
l.y = j
b.z = f
b.x = f
b.q = l
b.u = g
b.y = j
f.o = b
assert c.q.y.u.x.v.o.y.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: I = None
        self.w: C = None
        self.r: I = None
        self.s: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.q: G = None
        self.u: B = None
        self.y: A = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

j.u = m
g.z = l
c.o = g
c.q = b
k.o = g
k.v = f
k.r = f
k.w = c
k.s = j
h.u = g
m.x = k
m.t = g
l.y = j
b.z = f
b.x = f
b.q = l
b.u = g
b.y = j
f.o = b
assert c.q.y.u.x.v.o.y.u.t.txt == "g"