class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: E = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: A = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

j = A("j")
h = B("h")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
m = G("m")
d = C("d")
i = G("i")

j.r = e
j.s = e
j.p = e
j.y = f
j.t = f
h.t = g
h.z = j
h.x = e
l.x = g
l.q = i
l.p = m
l.r = f
l.w = f
l.z = f
e.s = g
f.y = i
f.o = d
f.w = j
f.z = m
g.o = l
g.t = l
g.p = j
g.w = j
m.o = f
m.u = j
m.q = e
m.p = l
m.w = h
m.s = g
m.y = g
d.x = g
d.q = m
d.p = m
d.r = f
d.w = f
d.z = f
i.o = f
i.u = j
i.q = e
i.p = l
i.w = h
i.s = g
i.y = g
assert i.u.p.s.t.q.q.s.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.y: E = None
        self.t: E = None
        self.p: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: C = None
        self.w: A = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: A = None
        self.t: C = None
        self.w: A = None
        self.txt = txt

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

j = A("j")
h = B("h")
l = C("l")
e = D("e")
f = E("f")
g = F("g")
m = G("m")
d = C("d")
i = G("i")

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