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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.u: I = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.v: F = None
        self.t: I = None
        self.w: G = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.q: B = None
        self.u: I = None
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: D = None
        self.v: F = None
        self.t: I = None
        self.w: G = None
        self.y: F = None
        self.z: E = None
        self.txt = txt

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

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

e.w = d
i.r = h
i.t = b
n.r = i
n.p = i
n.y = b
n.z = h
g.s = j
g.v = j
b.r = g
b.q = i
b.u = j
b.z = m
b.v = h
k.y = d
k.q = i
m.z = g
m.v = k
h.q = m
h.w = m
h.u = g
h.v = k
h.y = k
h.t = j
h.z = b
j.y = k
d.z = g
d.v = k
assert j.y.y.v.y.txt == "d"