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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.q: G = None
        self.t: D = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.y: F = None
        self.z: B = None
        self.p: A = None
        self.t: F = None
        self.v: A = None
        self.o: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: B = None
        self.x: F = None
        self.w: B = None
        self.r: A = None
        self.q: G = None
        self.t: D = None
        self.o: G = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: D = None
        self.y: F = None
        self.z: B = None
        self.p: A = None
        self.t: F = None
        self.v: A = None
        self.o: I = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: C = None
        self.x: H = None
        self.z: F = None
        self.txt = txt

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

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