class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: E = None
        self.v: G = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.w: F = None
        self.t: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.o: A = None
        self.r: G = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.w: F = None
        self.t: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: D = None
        self.o: A = None
        self.r: G = None
        self.s: D = None
        self.v: F = None
        self.txt = txt

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

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

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