class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: D = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: E = None
        self.y: A = None
        self.o: G = None
        self.p: D = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.u: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.q: E = None
        self.t: F = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
m = D("m")
j = E("j")
h = F("h")
k = G("k")
a = H("a")
l = B("l")
g = D("g")

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: E = None
        self.y: A = None
        self.o: G = None
        self.p: D = None
        self.v: C = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.u: E = None
        self.w: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: D = None
        self.q: E = None
        self.t: F = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.u: A = None
        self.txt = txt

i = A("i")
e = B("e")
b = C("b")
m = D("m")
j = E("j")
h = F("h")
k = G("k")
a = H("a")
l = B("l")
g = D("g")

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