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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.z: H = None
        self.y: E = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.v: F = None
        self.q: C = None
        self.u: D = None
        self.z: C = None
        self.y: D = None
        self.o: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: I = None
        self.q: H = None
        self.z: H = None
        self.y: E = None
        self.w: C = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: A = None
        self.v: F = None
        self.q: C = None
        self.u: D = None
        self.z: C = None
        self.y: D = None
        self.o: A = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

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