class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.w: E = None
        self.s: B = None
        self.x: C = None
        self.y: G = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.u: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: G = None
        self.t: B = None
        self.o: A = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: C = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.u: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: B = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: G = None
        self.t: B = None
        self.o: A = None
        self.q: B = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: D = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: C = None
        self.r: F = None
        self.u: E = None
        self.txt = txt

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

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