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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.o: E = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: B = None
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: H = None
        self.o: E = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.w: E = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: B = None
        self.y: G = None
        self.o: B = None
        self.txt = txt

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

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