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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.u: C = None
        self.r: C = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.u: F = None
        self.t: A = None
        self.v: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: G = None
        self.z: G = None
        self.w: F = None
        self.q: C = None
        self.y: G = None
        self.x: D = None
        self.s: G = None
        self.p: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: C = None
        self.z: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.u: C = None
        self.r: C = None
        self.t: A = None
        self.w: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: B = None
        self.u: F = None
        self.t: A = None
        self.v: D = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: G = None
        self.z: G = None
        self.w: F = None
        self.q: C = None
        self.y: G = None
        self.x: D = None
        self.s: G = None
        self.p: G = None
        self.txt = txt

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

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

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