class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: F = None
        self.w: A = None
        self.x: C = None
        self.r: I = None
        self.p: A = None
        self.v: I = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: H = None
        self.q: I = None
        self.y: D = None
        self.s: E = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: G = None
        self.v: E = None
        self.z: B = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: H = None
        self.q: I = None
        self.y: D = None
        self.s: E = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: E = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: G = None
        self.v: E = None
        self.z: B = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

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

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