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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.r: C = None
        self.z: F = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: A = None
        self.r: C = None
        self.z: F = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

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