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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: G = None
        self.y: E = None
        self.q: G = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.t: D = None
        self.y: A = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

b = A("b")
i = B("i")
j = C("j")
n = D("n")
g = E("g")
l = F("l")
m = G("m")

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: G = None
        self.y: E = None
        self.q: G = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: C = None
        self.t: D = None
        self.y: A = None
        self.x: B = None
        self.w: E = None
        self.txt = txt

b = A("b")
i = B("i")
j = C("j")
n = D("n")
g = E("g")
l = F("l")
m = G("m")

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