class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: E = None
        self.w: H = None
        self.y: B = None
        self.p: F = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.q: E = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.z: G = None
        self.r: C = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

d = A("d")
m = B("m")
c = C("c")
h = D("h")
j = E("j")
f = F("f")
k = G("k")
l = H("l")
g = E("g")
n = B("n")

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: E = None
        self.w: H = None
        self.y: B = None
        self.p: F = None
        self.o: D = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.q: E = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.z: G = None
        self.r: C = None
        self.u: G = None
        self.q: G = None
        self.txt = txt

d = A("d")
m = B("m")
c = C("c")
h = D("h")
j = E("j")
f = F("f")
k = G("k")
l = H("l")
g = E("g")
n = B("n")

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