class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.y: H = None
        self.x: B = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.p: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: G = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

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

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