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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.z: I = None
        self.t: I = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.r: H = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: C = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: D = None
        self.z: I = None
        self.t: I = None
        self.q: A = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.r: H = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: C = None
        self.v: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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