class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.u: C = None
        self.r: C = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

a = A("a")
h = B("h")
g = C("g")
l = D("l")
c = E("c")
e = F("e")
d = G("d")
b = F("b")
m = D("m")
j = C("j")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: A = None
        self.u: C = None
        self.r: C = None
        self.o: A = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.txt = txt

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

a = A("a")
h = B("h")
g = C("g")
l = D("l")
c = E("c")
e = F("e")
d = G("d")
b = F("b")
m = D("m")
j = C("j")

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